package com.heei.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: spring-cloud-learning
 * @description: 服务清单接口
 * @author: HuPing
 * @create: 2020-10-22 10:03
 **/
@RestController
public class DcController {

    @Autowired
    DiscoveryClient discoveryClient;

    @GetMapping("/dc")
    public String dc() {
        return "Services: " + discoveryClient.getServices();
    }
}
